package com.base.operator;


public class demo06 {

    public static void main(String[] args) {
        //1. 整数拓展  进制  二进制0b 十进制 八进制0 十六进制0x

        int i = 10;
        int i2 = 010;  //八进制0
        int i3 = 0x11;  //十六简直0x  A-F

        System.out.println(i); //10
        System.out.println(i2); //8
        System.out.println(i3); //17

        //2. 浮点数拓展  银行业务
        //float  有限，离散，有误差，大约等于
        //double
        //BigDecimal

        float f = 0.1f;
        double d = 1.0/10;

        System.out.println(f); //0.1
        System.out.println(d);  //0.1
        System.out.println(f == d);  //false

        float d1 =22222222222334444f;
        float d2 = d1+1;
        System.out.println(d1==d2);//true

        //3.字符拓展
        char c1 = 'a';
        char c2 = '中';

        System.out.println(c1);
        System.out.println((int)(c1));//97
        System.out.println(c2);
        System.out.println((int)(c2));//20013
        //所有字符本质是数字。unicode表

        //4. 转义字符
        // \t制表符
        //\n 换行

        System.out.println("hello\tWorld");
        System.out.println("hello\nWorld");

        //5.对象，从内存分析
        String sa = new String("hello wwj"); //false
        String sb = new String("hello wwj"); //true
        System.out.println(sa==sb);

        String sc = "hello wwj";
        String sd = "hello wwj";
        System.out.println(sc==sd);

        //6.布尔值扩展
        boolean flag = true;
        if (flag){ //flag类似于flag==true
            System.out.println(flag);
        }




    }





}
